package woaini.wind.ai.controller;

import dev.langchain4j.model.output.structured.Description;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@NoArgsConstructor
@Data
@Description("知识库返回信息")
public class DatesetResponse implements Serializable {

  @Description("查询内容")
  private QueryDTO query;

  @Description("检索记录")
  private List<RecordsDTO> records;

  @NoArgsConstructor
  @Data
  public static class QueryDTO implements Serializable {

    @Description("文档内容")
    private String content;
  }

  @NoArgsConstructor
  @Data
  public static class RecordsDTO implements Serializable {

    @Description("文档片段信息")
    private SegmentDTO segment;

    @Description("分数")
    private Double score;

    @NoArgsConstructor
    @Data
    public static class SegmentDTO implements Serializable {

      @Description("文档内容")
      private String content;

      @Description("QA文档回复")
      private String answer;

      @Description("文档信息")
      private Document document;

      @Description("关键字列表")
      private List<String> keywords;

      public static class Document implements Serializable {

        @Description("文档名称")
        private String name;
      }

    }


  }


}
